//
//  BaseRefreshTableController.m
//  bus
//
//  Created by hychen on 17/3/30.
//  Copyright © 2017年 Hychen. All rights reserved.
//

#import "BaseRefreshTableController.h"
#import "BusRefreshHeader.h"

@interface BaseRefreshTableController ()

@end

@implementation BaseRefreshTableController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.tableView.mj_header = [BusRefreshHeader headerWithRefreshingTarget:self refreshingAction:@selector(refreshData)];
}
- (void)setIsOpenFooterRefresh:(BOOL)isOpenFooterRefresh{
    if (_isOpenFooterRefresh) {
        return;
    }
    _isOpenFooterRefresh = isOpenFooterRefresh;
    if (isOpenFooterRefresh) {
        self.tableView.mj_footer = [MJRefreshAutoNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(loadMoreData)];
    }
    else{
        NSLog(@"未开启上拉");
    }
}

@end
